package org.sanmao.wyj.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.sanmao.wyj.domain.Complain;
import org.springframework.stereotype.Service;

@Mapper
public interface ComplainDao extends BaseMapper<Complain> {
    @Select("select cp.*,w.name as worker_name,w.phonenum as worker_phonenum,u.name as user_name,u.phonenum as user_phonenum,o.content as order_content,o.time as order_time,o.slocation as order_slocation,o.elocation as order_elocation from complain as cp left join worker as w on cp.wid = w.wid LEFT JOIN `user` AS u on cp.uid = u.uid LEFT JOIN orders as o on cp.oid = o.oid ")
    IPage<Complain> findFullComplain(IPage<Complain> page);
}
